export const useTestStore = defineStore('test', {
  state: () => {
    let count = 0;
    if(localStorage.getItem("test-store")){
      count = Number(localStorage.getItem("test-store"));
    }
    return { count: count }
  },
  actions: {
    inc() {
      this.count++
      localStorage.setItem("test-store", this.count.toString());
    },
    zero() {
      this.count = 0
      localStorage.setItem("test-store", this.count.toString());
    },
  },
})